﻿function swfupload(url, returnImg, returnInput, folder) {
    art.dialog.data('imgurl', document.getElementById(returnInput).value); //传输图片路径
    art.dialog.open(url, {
        title: '图片上传',
        init: function () {
            var iframe = this.iframe.contentWindow;
            iframe.document.getElementById('imgshow').src = art.dialog.data('imgurl');
            iframe.document.getElementById('oldimageurl').value = art.dialog.data('imgurl');
            iframe.document.getElementById('id').value = folder;
        },
        lock: true,
        cancel: true,
        ok: function () {
            var returnValue = art.dialog.data('returnValue');
            if (returnValue != undefined) {
                document.getElementById(returnImg).src = returnValue;
                document.getElementById(returnInput).value = returnValue;
            }
        }
    });
}